@*
 *Author：jxx
 *Contact：283591387@qq.com
 *Date：2018-07-01
 * 此代码由框架生成，请勿随意更改
 *@
@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>





<script>
    @{ViewBag.dropDownIds = "enable";}
    var searchData = [[{"columnType":"string","dataSource":[],"displayType":"text","text":"角色名称","require":false,"id":"RoleName"},{"columnType":"string","dataSource":[],"displayType":"text","text":"部门名称","require":false,"id":"DeptName"},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"select","text":"是否启用","require":false,"id":"Enable"}],[{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"创建时间","require":false,"id":"CreateDate"},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"修改时间","require":false,"id":"ModifyDate"}]];
    var editData = [[{"columnType":"int","dataSource":[],"displayType":"","text":"父级ID","require":true,"id":"ParentId"},{"columnType":"string","dataSource":[],"displayType":"","text":"角色名称","require":false,"id":"RoleName"}],[{"columnType":"int","dataSource":[],"displayType":"","text":"部门ID","require":false,"id":"Dept_Id"},{"columnType":"string","dataSource":[],"displayType":"","text":"部门名称","require":false,"id":"DeptName"}],[{"columnType":"int","dataSource":[],"displayType":"","text":"排序","require":false,"id":"OrderNo"},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":false,"id":"Enable","disabled":1}],[{"columnType":"string","dataSource":[],"displayType":"","text":"创建人","require":false,"id":"Creator","disabled":1},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"创建时间","require":false,"id":"CreateDate","disabled":1}]];


    var gridParameters = {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'Role_Id',
        url: '/Sys_Role/GetPageData',
        nameSpace:'',
        queryParams: {TableName:'Sys_Role',sort:'Role_Id',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        fileLink:false,
        richText:false,
        hasSection:false,
        cnName:'角色管理',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:1070,totalCol:11},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'Role_Id',title:'Id',datatype:'int',width:90,readonly:true,require:true,align:'left',sortable:true},
                       {field:'ParentId',title:'父级ID',datatype:'int',width:90,editor:'text',require:true,align:'left'},
                       {field:'RoleName',title:'角色名称',datatype:'string',width:90,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val,index:index})},align:'left'},
                       {field:'Dept_Id',title:'部门ID',datatype:'int',width:90,editor:'text',align:'left'},
                       {field:'DeptName',title:'部门名称',datatype:'string',width:90,editor:'text',align:'left'},
                       {field:'OrderNo',title:'排序',datatype:'int',width:90,editor:'text',align:'left'},
                       {field:'Creator',title:'创建人',datatype:'string',width:130,readonly:true,editor:'text',align:'left'},
                       {field:'CreateDate',title:'创建时间',datatype:'DateTime',width:90,readonly:true,editor:'datetimebox',align:'left',sortable:true},
                       {field:'Modifier',title:'修改人',datatype:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',datatype:'DateTime',width:90,align:'left',sortable:true},
                       {field:'Enable',title:'是否启用',datatype:'byte',width:90,readonly:true,editor: { type: 'combobox', options: optionConfigenable },formatter: function (val, row, index) {
    return dataSourceenable.textFormatter(optionConfigenable, val, row, index);
    },
align:'left'}]]
    };

    var $elementGrid;
    window.onload = function () {
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>
